import CountUI from '../../components/count'
import { connect } from 'react-redux'
import { increment, decrement, asyncIncrement } from '../../redux/actions/count_action'
const mapStateToProps = (count) => {
  return { count }
}
/* const mapDispatchToProps = (dispatch) => {
  return {
    increment(data) {
      dispatch(increment(data))
    },
    decrement(data) {
      dispatch(decrement(data))
    },
    asyncIncrement(data, delay) {
      dispatch(asyncIncrement(data, delay))
    }
  }
} */
// 简写方式
const mapDispatchToProps = {
  increment,
  decrement,
  asyncIncrement
}
const CountContainer = connect(mapStateToProps, mapDispatchToProps)(CountUI)
export default CountContainer